Here are some use cases that can be used as examples.
The first step to reduce data with 4-Circle GUI is to set up the reduction environment.
Reduction cannot work correctly if this step is SKIPPED.
- Go to tab Setup & Data Access;
- Set up Data Directory and Working Directory;
- An alternative way to step 2 is to push button Load Default;
- Push button Apply. Mantid thus checks whether the setup, including source data file’s URL, data directory and working directory are valid. Be noticed that the check of URL may return timeout error. It might be a false alarm. You might push the Apply button few more times.
Usually if it is the first time to reduce data for an experiment, it is
recommended to go through the whole experiment to gather some information.
- Go to tab Survey;
- Set up experiment number on the top of application window;
- Input the range of the scan numbers for survey. Leaving them blank will result in going through all scans of the experiment;
- Click button Survey;
- It might take a while to load and scan all the SPICE files belonged to an individual experiment. After it is finished, the result will be shown in the table.
- Save the survey result for future by clicking button Save;
- Select a row, and click button View Peak, application will switch to tab View Raw Data automatically and set the scan and Pt number from the selected row.
Here is a typical use case to calculate UB matrix after initial setup.
- User specifies Experiment and pushes button Set
- Users may do a new survey or load a survey result file in tab Survey;
- User enters tab View Raw Data and inputs scan number and list all the measuring points (Pt.)
- User views all the measurements
- User finds out the measurement with the strongest reflection and push button use
- Alternatively, user can use the survey result to find out the Pt. with the maximum counts of the scan
- GUI shifts to tab Calculate UB automatically
- User pushes button Find Peak with checking Load HKL from file
- GUI finds the peak center and load HKL
- User pushes button Add peak to add the peak to table
- User repeats step 2 to 9 to add other peaks
- User select the peaks that are linearly independent and pushes Calculate UB
- GUI calculates UB matrix and show the result
- User may push Index peak to use the calculated UB matrix to index peaks in the table to check UB matrix;
- User may refine the UB matrix and thus lattice parameters
- user adds more peaks to the UB peak table;
- user selects at least 3 non-degenerate peaks;
- user clicks button Refine;
- application refines UB matrix and outputs the refined UB matrix, refined lattice parameters and their error.
Here is a typical use case to merge all the measuring points (Pt.) in a scan
- User specifies Experiment and pushes button Set
- User enters tab Merge Scan
- User specifies the UB matrix either by From tab Calculate UB or by entering the values to text editor
- User pushes button Set
- User specifies the frame in which the merged data will be in. If the target frame is Q-Sample-Sapce, then there is no need to specify UB matrix
- User specifies the scan numbers and push button Add
- User specifies the base name for the output MDEventWorkspaces
- User pushes button Process
- User goes to MantidWorkbench to view the merged scan by SliceView
It is a common practice to have one measurement in a scan for a peak. The only reason to do so is that the signal is too weak for users to have enough beam time to have multiple measurements in a single peak’s scan. Therefore, it is not straight forward to calculate peak intensity from this type of measurement.
- A user specifies the range of scan numbers that include all the neutron peaks regardless whether they are single-point measurement or multiple-points measurement.
- The user pushes button Survey. Mantid will load all the SPICE files of the scans.
- The users selects All single-point-measurement scans by checking Single Pt Scans.
- The user launches single-point peak integration window from menu Peak Integraton and sub menu Single Pt Integration. Mantid will add all the single-point scans to the popped out window.
- The user will be prompted with the information about how to map single-point scan to a complete nuclear peak scan with same 2theta.
- The user may load a CSV file to which integrated peak table was exported previously.
- The user pushes button Retrieve FWHM. Mantid then will gather FWHM value from integrated peak.
- The user add mapped scans for each single-pt scan to peak processint tab, and integrate peaks.
- The user pushes Retrieve FHWHM again to make sure every scan to have an FWHM.
- The user pushes Integrate to integrate peaks.
- The user pushes Export to Table to add the integrated peaks to peak processing table for final output.
This is an easy approximation to integrate a peak with background subtraction
by specified region of interest.
The pre-requisit is that all events are normalized by monitor counts
and scaled up by same factor (e.g, 1500).
- Set up region of interest
- define region of interest on the detector
- check whether the ROI does not exclude any peak
- Specify background Pts.
- specify the Pts. in the scan that are used to estimate background
- Integrate peaks
- select peaks to integrate
- integrate peaks
- Review the integration result
- Export to Fullprof peak integration (.int) file.
Unlike TOF single crystal diffractometer, HB3A uses a different method to integrate diffraction peaks.
Presently, HB3A reduction interface supports 3 types of integrations.
Counts of neutron on any detector shall be normalized by its corresponding monitor
count and then be multiplied by a constant specified by user.
But for HB3A, the normalization to counting time is more reliable because the
beam monitor may be unstable.
A region of interest (ROI) on the detector can be defined for each scan.
The signals in the ROI of each Pt. in a scan construct a 3-dimensional diffraction peak.
The purpose to define the region of interest on detector is to reduce the affect of background noise.
This algorithm is also called simple cuboid integration,
which is to approximate the integrated peak intensity.
Measuring one peak usually contains around 20 Pt. in a same scan.
In most of the cases, the first and last several measurements (called as Pt in SPICE) are
background.
Therefore, the background for per measurement can be estimated by averaging the
summed number of counts normalized by either monitor counts or measuring time.
The integrated peak intensity is
\[I = \sum_i (C_i - B_i) \times \Delta X\]
- where
- \(C_i\) is the normalized detector counts in ROI of measurement i
- \(\Delta X\) is the motor step
- \(B_i\) is the estimated background
The error can be calculated as
\[\sigma = \sum_i \sqrt{C_i} \cdot \Delta X\]
For each measurement, the background \(B_i\) is calculated as
\[B^{(e)} = \frac{\sum_i^{<pt>}C_i}{|<pt>|}\]
where \(<pt>\) is a set of measurement points that are specified by users.
Usually they are the first and last several measurements in a scan.
Then this estimated normalized background value can be applied to each measuremnt, whose counts are normalized.
This algorithm is based on previous algorithm.
It is assumed that if the statistic of the diffraction peak is good enough, then
the curve, i.e., moving motor position against normalized counts, can be
fitted with a Gaussian plus flat background.
\[C = A\times e^{-(x - x_0)^2/(2s^2)} - B\]
- where
- x is the (moving) motor position
- C is the normalized counts in ROI when the moving motor is at x
The integrated peak intensity and its error will be calculated as
\[I = \sum_i^{<pt>} (C_i - B) \times \Delta X\]
- where
- \(C_i\) is the normalized detector counts in ROI of measurement i
- \(\Delta X\) is the motor step
- \(B_i\) is the estimated background
- the set of measurements <pt> is defined by the motor positions in the range of \(x_0 \pm \frac{N}{2}FWHM\).
- usually the default value of N is set to 2.
- \(FWHM = 2\sqrt{2\ln2}s \approx 2.3548s\)
The error can be calculated as
\[\sigma = \sum_i \sqrt{C_i} \cdot \Delta X\]
It is assumed that for a well measured diffraction peak, in 3D,
the counts in ROI of each measurement from the edge of the peak to the other edge of peak
against the moving motor’s positions should be represented by a Gaussian function with
flat background
\[C = A\times e^{-(x - x_0)^2/(2s^2)} - B\]
Then the peak intensity should be the integral of the Gaussian from \(-\inf\) to \(+\inf\),
i.e.,
\[I = A\times s\times\sqrt{2\pi}\]
The error of the intensity should be calculated by the propagation of fitted error of A and s.
\[\sigma_I^2 = 2\pi (A^2\cdot \sigma_s^2 + \sigma_A^2\cdot s^2 + 2\cdot A\cdot s\cdot \sigma_{As})\]
It is found that the standard deviation of A from covariance matrix calculated from scipy.curve_fit library
is very large, which causes an unreasonably large estimated error on integrated intensity I.
There are some other peak integration algorithms that we discussed.
None of them has been implemented.
But it is still worth to document them here.
There is no existing algorithm in Mantid to integrate ellipsoid because1
algorithm IntegrateEllipsoids works only for event in unit as time-of-flight.
So far, there is only one algorithm is implemented to integrate peaks for HB3A.
In the Q-space, by masking each measurement, it is assumed that the peak’s intensity
is very close to the number of counts in the unmasked cuboid normalized either by
measuring time or beam monitor counts with background removed.
\[I = \sum_{i} \frac{n_i}{F_i} - B^{(e)}\]
where \(n_i\) is the counts of Pt i in the region of interest,
\(F_i\) is the normalization factor of Pt i,
and B^{(e)} is the estimated background per Pt with the same
normalization type of \(F_i\).
For each measurement, the background \(B_i\) is calculated as
\[B_i = \frac{\sum^{(pt)}_{\{d_i\}}n_{d_i}}{F^{(a)}_{d_i}}\]
where \(F^{(a)}\) is the normlization of either time or beam monitor counts,
and \(n_{d_i}\) is the neutron counts of measumrent \(d_i\).
Then the estimation of the normalized background for each measurement is
\[B^{(e)} = \sum_{\{P_i\}}\frac{B_i}{N}\]
where \(N\) is the number of measurements used to calculated background.
Category: Interfaces